package patrol.mobile.com.mobilepatrol.adapter;

import android.content.Context;

import com.dl7.recycler.adapter.BaseQuickAdapter;
import com.dl7.recycler.adapter.BaseViewHolder;

import patrol.mobile.com.mobilepatrol.R;
import patrol.mobile.com.mobilepatrol.bean.OtherOfficeDetailBean;

/**
 * Created by K on 2018/9/11.
 * des: 进度管理
 */
public class OtherOfficeDetailAdapter extends BaseQuickAdapter<OtherOfficeDetailBean.UserScheduleListBean> {

    public OtherOfficeDetailAdapter(Context context) {
        super(context);
    }

    @Override
    protected int attachLayoutRes() {
        return R.layout.item_other_office_detail;
    }

    @Override
    protected void convert(BaseViewHolder holder, OtherOfficeDetailBean.UserScheduleListBean item) {
        holder.setText(R.id.tv_num, (holder.getAdapterPosition() + 1) + "");
        holder.setText(R.id.tv_title, item.getTitle());
        holder.setText(R.id.tv_name, "上报人："+item.getTerm());
        holder.setText(R.id.tv_time, "上报时间："+item.getUpDate());
        holder.setText(R.id.tv_progress, item.getCompletion() + "%");
    }
}
